<script setup>
// uni.navigateBack(2)

const gohome = () => {
  // uni.navigateBack()
  let pages = getCurrentPages();

  // 获取页面栈的长度，即页面跳转层级
  let level = pages.length;
  if (level > 1) {
    uni.navigateBack();
  } else {
    uni.switchTab({
      url: "/pages/my/index",
    });
  }
};
</script>
<template>
  <view class="paycontent">
    <!-- pay-err -->
    <view class="pay-hx"> </view>
    <view class="pay-res">
      <view class="pay-res-img">
        <image src="@/pages/upgrade/static/icon_successful.png" mode=""></image>
      </view>
      <view class="pay-res-name"> 开通成功 </view>
      <view class="pay-res-dec"> 升级成功，请通知对方签订协议 </view>
      <view class="pay-res-k">
        <!-- <view class="pay-res-see" @click="gohome"> 返回 </view> -->
        <view class="pay-res-bt" @click="gohome"> 返回 </view>
      </view>
    </view>

    <!-- <view class="pay-res">
      <view class="pay-res-img">
        <image
          src="@/pages/upgrade/static/icon_successfulerr.png"
          mode=""
        ></image>
      </view>
      <view class="pay-res-name"> 支付失败 </view>
      <view class="pay-res-dec"> 我们将在5个工作日内为您处理 </view>
      <view class="pay-res-k">
        <view class="pay-res-see refresh-pay" @click="gohome"> 返回 </view>
      </view>
    </view> -->
  </view>
</template>

<style lang="scss" scoped>
@import "index.scss";
</style>
